namespace WMS.RealTime.Domain.DTOs
{
    /// <summary>
    /// 今日/昨日概况
    /// </summary>
    public class DailyOverview
    {
        public int DocumentCount { get; set; }      // 单据数量
        public int InboundQuantity { get; set; }    // 入库数量
        public decimal InboundAmount { get; set; }  // 入库金额
        public int OutboundQuantity { get; set; }   // 出库数量
        public decimal OutboundAmount { get; set; } // 出库金额
        public DateTime Date { get; set; }
    }

    /// <summary>
    /// 仓库数据
    /// </summary>
    /// <summary>
    /// 仓库数据
    /// </summary>
    public class WarehouseData
    {
        public string WarehouseName { get; set; } = string.Empty;
        public int Quantity { get; set; }
        public decimal Amount { get; set; }
    }

    /// <summary>
    /// 类别数据
    /// </summary>
    public class CategoryData
    {
        public string Name { get; set; } = string.Empty;
        public int Quantity { get; set; }
        public decimal Amount { get; set; }
    }

    /// <summary>
    /// 库存占比
    /// </summary>
    public class InventoryProportion
    {
        public int TotalQuantity { get; set; }      // 总库存数量
        public decimal TotalAmount { get; set; }    // 总库存金额
        public List<CategoryData> Categories { get; set; } = new();  // 按类别统计
        public List<WarehouseData> Warehouses { get; set; } = new(); // 按仓库统计
    }

    /// <summary>
    /// 每日数据
    /// </summary>
    public class DailyData
    {
        public DateTime Date { get; set; }
        public int Quantity { get; set; }
        public decimal Amount { get; set; }
    }

    /// <summary>
    /// 入库统计
    /// </summary>
    public class InboundStatistics
    {
        public List<DailyData> DailyData { get; set; } = new();
        public string TimeRange { get; set; } = string.Empty; // 最近7天/30天/一年
    }

    /// <summary>
    /// 待审核
    /// </summary>
    public class PendingApproval
    {
        public int InboundDocuments { get; set; }
        public int OutboundDocuments { get; set; }
        public int TransferDocuments { get; set; }
        public int PurchaseDocuments { get; set; }
        public int SalesDocuments { get; set; }
        public int PurchaseReturns { get; set; }
        public int SalesReturns { get; set; }
    }

    /// <summary>
    /// 待执行
    /// </summary>
    public class PendingExecution
    {
        public int PendingInbound { get; set; }
        public int PendingOutbound { get; set; }
    }

    /// <summary>
    /// 待办事项
    /// </summary>
    public class TodoItems
    {
        public PendingApproval PendingApproval { get; set; } = new();
        public PendingExecution PendingExecution { get; set; } = new();
    }

    /// <summary>
    /// 告警数据
    /// </summary>
    public class AlertData
    {
        public int InventoryAboveLimit { get; set; }
        public int InventoryBelowLimit { get; set; }
        public int ExpiringGoods { get; set; }
        public int ExpiredGoods { get; set; }
    }

    /// <summary>
    /// 排名项目
    /// </summary>
    public class RankingItem
    {
        public int Rank { get; set; }
        public string ProductName { get; set; } = string.Empty;
        public int Quantity { get; set; }
        public decimal Amount { get; set; }
        public int Count { get; set; }
    }

    /// <summary>
    /// 排名数据
    /// </summary>
    public class RankingData
    {
        public List<RankingItem> InboundRanking { get; set; } = new();
        public List<RankingItem> OutboundRanking { get; set; } = new();
    }
} 